//index.js
//获取应用实例
var app = getApp()
Page({
  data: {
    list: []
  },
  //事件处理函数
  bindViewTap: function() {
    wx.navigateTo({
      url: '../logs/logs'
    })
  },
  onLoad: function () {
         
  },
  onShow:function(){
    var that       = this;
    var session_id = wx.getStorageSync('session_id');
    wx.request({
      url: app.data.servser + 'index/usagelog',
      data: {
        session_id: session_id,
      },
      success: function (res) {
        that.setData({
            list:res.data
        });
      }
    })
  },
  goRechargePage:function(){
     wx.navigateTo({ url: '/pages/recharge/recharge' })
  }
})
